package com.chuanyang.driverh.mainother;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.ImageView;

import com.chuanyang.driverh.R;
import com.chuanyang.driverh.utils.BitmapUtil;
import com.chuanyang.driverh.utils.LogUtils;
import com.chuanyang.driverh.utils.widget.photoview.PhotoView;


/**
 * 西风多少恨，吹不散眉弯！—唐大帅
 *
 * @author 唐帅
 *         查看一张图片
 *         created at
 */

public class LookPhotoDetailActivity extends Activity implements View.OnClickListener {

    private String path;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.other_act_lookphoto);
        initView();
    }

    public void initView() {
        Intent intent = getIntent();
        path = intent.getStringExtra("data");
        LogUtils.e("LookPhotoDetailActivity","-------------------"+path);
        PhotoView photoView = (PhotoView) findViewById(R.id.gallery01);
        photoView.setScaleType(ImageView.ScaleType.FIT_CENTER);
        ImageView back = (ImageView) findViewById(R.id.iv_left);
//        YncApplication.getInstance().loadImage(this, path, R.drawable.shengfeng, R.drawable.shengfeng, photoView);
        BitmapUtil.showImgForNetPath(path,photoView);
        back.setOnClickListener(this);

    }

    @Override
    public void onClick(View v) {
        if (v.getId() == R.id.iv_left) {
            finish();
        }
    }




}